//package com.baidu.yyb.AlertDialogUI;
//
//import android.content.Context;
//import android.view.View;
//import android.widget.Button;
//import android.widget.LinearLayout;
//import android.widget.RadioGroup;
//import android.widget.RelativeLayout;
//import android.widget.TextView;
//
//import androidx.appcompat.app.AppCompatActivity;
//import androidx.recyclerview.widget.LinearLayoutManager;
//import androidx.recyclerview.widget.RecyclerView;
//import androidx.recyclerview.widget.StaggeredGridLayoutManager;
//
//
//import com.google.android.material.floatingactionbutton.FloatingActionButton;
//import com.baidu.yyb.Adapter.ListViewAdapter;
//import com.baidu.yyb.Adapter.recycleAdapter;
//import com.baidu.yyb.Adapter.recycleAdapterDataNull;
//import com.lt.utils.Operations.GoActivity;
//
//import java.util.ArrayList;
//import java.util.HashSet;
//import java.util.Set;
//
//public class recycleViewShow extends AppCompatActivity{
//    private final Context MyContext;
//    private final RecyclerView recyclerView1;
//    private final Boolean IsNullData;
//    private LinearLayout bottom_delete;
//    private RadioGroup bottom_main;
//    private final ArrayList<NotesClassData> NotesList;
//    private int privateCode = 0;
//    private RelativeLayout DeleteLayout, topMain;
//    private TextView tv;
//    private boolean isDeleteMode = false;
//    private FloatingActionButton fab;
//    private Set<NotesClassData> notesClassDataSet = new HashSet<>();
//    private final int style = -1;
//    private Button btn_allSelect,btn_reverseSelect;
//
//
//    /*****
//     *
//     * @param code==1 正常模式  code==0 加密模式
//     * @param IsNull 数据是否为空
//     * @param rec recycle控件
//     * @param ArList 查询到的数据
//     */
//    public recycleViewShow(Context ct, RecyclerView rec, Boolean IsNull, ArrayList<NotesClassData> ArList, int code) {
//        MyContext = ct;
//        recyclerView1 = rec;
//        IsNullData = IsNull;
//        NotesList = ArList;
//        privateCode = code;
//    }
//
//    public recycleViewShow addLayout(RelativeLayout DeleteLayout, RelativeLayout topMain, LinearLayout bottom_delete, RadioGroup bottom_main, FloatingActionButton fab, TextView tv) {
//        this.DeleteLayout = DeleteLayout;
//        this.bottom_delete = bottom_delete;
//        this.fab = fab;
//        this.bottom_main = bottom_main;
//        this.tv = tv;
//        this.topMain = topMain;
//        DeleteLayout.setVisibility(View.GONE);
//        bottom_delete.setVisibility(View.GONE);
//        return this;
//    }
//    public recycleViewShow addLayout(RelativeLayout DeleteLayout, RelativeLayout topMain, LinearLayout bottom_delete,TextView tv) {
//        this.DeleteLayout = DeleteLayout;
//        this.bottom_delete = bottom_delete;
//        this.tv = tv;
//        this.topMain = topMain;
//        DeleteLayout.setVisibility(View.GONE);
//        bottom_delete.setVisibility(View.GONE);
//        return this;
//    }
//    public recycleViewShow addButton(Button btn_allSelect,Button btn_reverseSelect){
//        this.btn_reverseSelect=btn_reverseSelect;
//        this.btn_allSelect=btn_allSelect;
//        return this;
//    }
//
//    public void setModeStyle(boolean isDeleteMode) {
//        this.isDeleteMode = isDeleteMode;
//    }
//
//    public Set<NotesClassData> getNotesClassDataSet() {
//        return notesClassDataSet;
//    }
//
//    private void setNotesClassDataSet(Set<NotesClassData> notesClassDataSet) {
//        this.notesClassDataSet = notesClassDataSet;
//    }
//
//    /**
//     * 主页面显示
//     */
//
//    public void RecycleViewShow() {
//        if (privateCode == 1) {
//            if (IsNullData) {
//                recyclerView1.setLayoutManager(new LinearLayoutManager(MyContext));
//                recyclerView1.setAdapter(new recycleAdapterDataNull(MyContext, false));
//            } else {
//                recyclerView1.setLayoutManager(new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL));
//                recycleAdapter RAdapter = new recycleAdapter(MyContext, NotesList);
//                RAdapter.setRecycleClickListener(new recycleAdapter.OnItemCllikListener() {
//                    @Override
//                    public void OnClick(NotesClassData ncd) {
//                        GoActivity go_activity = new GoActivity(true, MyContext, StringName.ACTIVITY_DETAILS, ncd);
//                        go_activity.Go_Intent();
//                        go_activity.finish();
//                    }
//
//                    @Override
//                    public void OnLongClick(NotesClassData ncd) {
//                        /***
//                         * 不显示时
//                         */
//                        if (!DeleteLayout.isShown() && !bottom_delete.isShown()) {
//                            /***
//                             * 控件的显示
//                             */
//                            DeleteLayout.setVisibility(View.VISIBLE);
//                            bottom_delete.setVisibility(View.VISIBLE);
//                            fab.setVisibility(View.GONE);
//                            topMain.setVisibility(View.GONE);
//                            bottom_main.setVisibility(View.GONE);
//                            /****
//                             *保存本次长按的item
//                             */
//                            RAdapter.setSelectSet(ncd);
//                            /**
//                             * 设置模式
//                             */
//                            RAdapter.setIsDeleteMode(true);
//                            /***
//                             * 设置标题
//                             */
//                            RAdapter.setTile(tv);
//                            /***
//                             * 获取点击过的item
//                             */
//                            setNotesClassDataSet(RAdapter.getNotesClassDataSet());
//                            /**
//                             * 传递Button
//                             */
//                            RAdapter.addButton(btn_allSelect,btn_reverseSelect);
//                        }
//
//                    }
//                });
//                RAdapter.notifyDataSetChanged();
//                recyclerView1.setAdapter(RAdapter);
//            }
//        } else if (privateCode == 0) {
//            recyclerView1.setLayoutManager(new LinearLayoutManager(MyContext));
//            recyclerView1.setAdapter(new recycleAdapterDataNull(MyContext, true));
//        }
//    }
//
//
//    /**
//     * 搜索页面显示
//     */
//    public void SearchViewShow() {
//        if (IsNullData) {
//            recyclerView1.setLayoutManager(new LinearLayoutManager(MyContext));
//            recyclerView1.setAdapter(new recycleAdapterDataNull(MyContext, false));
//
//        } else {
//
//            recyclerView1.setLayoutManager(new LinearLayoutManager(MyContext));
//            ListViewAdapter RAdapter = new ListViewAdapter(true, MyContext, NotesList, new ListViewAdapter.OnItemClickListener() {
//                @Override
//                public void Onclick1(int pos) {
//                    GoActivity go_activity = new GoActivity(true, MyContext, StringName.ACTIVITY_DETAILS, NotesList.get(pos));
//                    go_activity.Go_Intent();
//                    go_activity.finish();
//                }
//            });
//
//            RAdapter.notifyDataSetChanged();
//            recyclerView1.setAdapter(RAdapter);
//        }
//    }
//
//    /**
//     * 回收站显示数据
//     */
//    public void binViewShow() {
//        if (IsNullData) {
//            recyclerView1.setLayoutManager(new LinearLayoutManager(MyContext));
//            recyclerView1.setAdapter(new recycleAdapterDataNull(MyContext, false));
//        } else {
//            recyclerView1.setLayoutManager(new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL));
//            recycleAdapter RAdapter = new recycleAdapter(MyContext, NotesList);
//            RAdapter.setRecycleClickListener(new recycleAdapter.OnItemCllikListener() {
//                @Override
//                public void OnClick(NotesClassData ncd) {
//                    GoActivity go_activity = new GoActivity(true, MyContext, StringName.ACTIVITY_BIN_DETAILS, ncd);
//                    go_activity.Go_Intent();
//                }
//
//                @Override
//                public void OnLongClick(NotesClassData ncd) {
//                    if (!DeleteLayout.isShown() && !bottom_delete.isShown()) {
//                        DeleteLayout.setVisibility(View.VISIBLE);
//                        bottom_delete.setVisibility(View.VISIBLE);
//                        topMain.setVisibility(View.GONE);
//
//                        RAdapter.setSelectSet(ncd);
//
//                        RAdapter.setIsDeleteMode(true);
//
//                        RAdapter.setTile(tv);
//
//                        setNotesClassDataSet(RAdapter.getNotesClassDataSet());
//
//                        RAdapter.addButton(btn_allSelect,btn_reverseSelect);
//
//
//                    }
//                }
//
//            });
//            RAdapter.notifyDataSetChanged();
//            recyclerView1.setAdapter(RAdapter);
//        }
//    }
//
//}
